<template>
  <div class="my-play-list" @click="$parent.showMyPlayList = false">
    <div class="card">
      <ul style="overflow-y: auto">
        <SongListItem
          v-for="item in currentPLayList"
          :key="item.id"
          :item="item"
          @click.native="$emit('update:currentSong', item)"
          :currentSong="currentSong"
        />
      </ul>
    </div>
  </div>
</template>

<script>
import SongListItem from "@/components/SongListItem.vue";

export default {
  components: {
    SongListItem,
  },
  props: ["currentPLayList", "currentSong"],
};
</script>

<style lang="less">
.my-play-list {
  background: rgba(0, 0, 0, 0.5);
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100;

  display: flex;
  justify-content: center;
  align-items: flex-end;
  .card {
    width: 90vw;
    height: 60vh;
    margin-bottom: 60px;
    background: rgb(179, 180, 111);
    border-radius: 20px;
    overflow-y: auto;
  }
}
</style>